@include('admin.common.header')
<!--tab nav start-->
<section class="panel">
    <header class="panel-heading tab-bg-dark-navy-blue ">
        <ul class="nav nav-tabs">
            <li @if ($_active['_action'] == 'list')  class="active" @endif>
                <a href="/admin/personInfo">个人中心详情</a>
            </li>
            <li @if ($_active['_action'] == 'listpoint')  class="active" @endif>
                <a href="/admin/personInfo/point">返现管理</a>
            </li>
        </ul>
    </header>
    <div class="panel-body">
        <div class="tab-content">
            <div class="row">
                <div class="col-lg-12">
                    <section class="panel">
                        @if($personInfo['pageData']['count'] == 0)
                            <div class="no-data">暂无要查询的内容</div>
                        @else
                            <table class="table table-striped table-advance table-hover">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>签名</th>
                                    <th>头像</th>
                                    <th>总积分</th>
                                    <th>用户等级</th>
                                    <th>现有积分</th>
                                    <th>添加积分</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($personInfo['list'] as $b)
                                    <tr>
                                        <td>{{ $b->id }}</td>
                                        <td>{{ $b->nick_name }}</td>
                                        <td><img width="100" src="{{ $b->headimgurl }}" alt=""></td>
                                        <td>{{ $b->totalPoints }}</td>
                                        <td>{{ $b->user_level==1?'合伙人':'普通会员' }}</td>
                                        <td>{{ $b->presentPoints }}</td>
                                        <td>
                                            <a href="/admin/personInfo/edit/{{ $b->id }}" target="_blank" class="btn btn-primary btn-xs update" >积分添加</a>
                                        </td>
                                        <td>
                                            <button href="/admin/personInfo/delete/{{ $b->id }}" class="delete btn btn-danger btn-xs"><i class="icon-trash "></i></button>
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        @endif
                    </section>
                </div>
            </div>
            @if($personInfo['pageData']['lastPage'] > 1)
                <div id="page" style="width:500px;margin: 0 auto;">
                    {!!  $personInfo['pageData']['pageHtml'] !!}
                </div>
            @endif
        </div>
    </div>
</section>
<!--tab nav start-->

<script>

    require(['app/goods' , 'common/common'] , function (goods , common) {
        common.deleteNotice();
        common.search();
    });

</script>

<script type="text/html" id="search">
    <section class="panel">
        <div class="panel-body">
            <div class="tab-content">
                <div class="row cmxform form-horizontal tasi-form">
                    <div class="col-lg-12">
                        <section class="panel">
                            <div class="panel-body">
                                <div class="form-group ">
                                    <label for="firstname" class="control-label col-lg-2">签名</label>
                                    <div class="col-lg-10">
                                        <input class=" form-control form-item" name="nickname" type="text"  value="@if(isset($search['nickname'])){{ $search['nickname'] }}@endif"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label for="lastname" class="control-label col-lg-2">id</label>
                                    <div class="col-lg-10">
                                        <input class=" form-control form-item" name="id" type="text" value="@if(isset($search['id'])){{ $search['id'] }}@endif"/>
                                    </div>
                                </div>

                            </div>
                        </section>
                    </div>
                </div>
                <div class="col-lg-12 text-center">
                    <button class="btn btn-danger search-form-submit" href="/admin/goods?type=1" type="button">搜索</button>
                </div>
            </div>
        </div>
    </section>
</script>

@include('admin.common.footer')